/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.solitaire.api.model.dto.manager;

import cn.hutool.core.bean.BeanUtil;
import com.medusa.gruul.solitaire.api.entity.SolitaireActivity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 接龙活动传输对象
 * </p>
 *
 * @author lcysike
 * @since 2020-06-05
 */
@Data
@ApiModel(value = "SolitaireActivityDto", description = "接龙活动传输对象")
public class SolitaireActivityDto implements Serializable {

    private Long id;

    @ApiModelProperty(value = "活动名称")
    @NotEmpty(message = "活动名称述不能为空")
    @Size(max =5, message = "活动名称不超过5个字")
    private String name;

    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    private Date endTime;

    @ApiModelProperty(value = "预热时间")
    private Integer preheatHour;

    @ApiModelProperty(value = "适用商品：  0-全部商品参与  1-指定商品参与  2-指定商品不参与")
    private Integer productType;

    @ApiModelProperty(value = "封面海报")
    @NotEmpty(message = "封面海报述不能为空")
    private String coverPoster;

    @ApiModelProperty(value = "描述")
    @NotEmpty(message = "商描述不能为空")
    @Size(max =15, message = "活动描述最多15个字")
    private String content;

    @ApiModelProperty(value = "活动状态：  0-未开始  1-进行中  2-已结束")
    private Integer status;

    @ApiModelProperty(value = "优惠劵关联商品信息")
    private List<SolitaireActivityProductDto> activityProducts;

    public SolitaireActivity coverActivity() {
        SolitaireActivity solitaireActivity = new SolitaireActivity();
        BeanUtil.copyProperties(this, solitaireActivity);
        return solitaireActivity;
    }
}
